package liang.jiaxin.com.configuration;

import liang.jiaxin.com.filter.LjxFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @User: Jrxsr
 * FilterConfig
 * on 2019/5/3.
 **/
@Configuration
public class FilterConfig extends Configs {

    @Bean
    public FilterRegistrationBean registrationBean() {
        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new LjxFilter());
        filterRegistrationBean.addUrlPatterns("/*");
        return filterRegistrationBean;
    }
}